import { getVendintype } from '@/api/fixing/fixingType'
export default {
  namespaced: true,
  state: {
    VendintypeList: []
  },
  mutations: {
    setVendintype_vuex (state, val) {
      const arr = val.map((item, index) => {
        return {
          ...item,
          num: index + 1
        }
      })
      state.VendintypeList = arr
      console.log(state.VendintypeList)
    }
  },
  actions: {
    async getVendintype_vuex (context) {
      const res = await getVendintype({
        pageIndex: 1000,
        pageSize: 10000
      })
      console.log(res.data.currentPageRecords)
      context.commit('setVendintype_vuex', res.data.currentPageRecords)
    }

  },
  getters: {

  }

}
